package net.lahuobao.mall.entity.admin;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.jeecgframework.web.system.pojo.base.TSBaseUser;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by Lenovo on 2017/3/29.
 */
@Entity
@Table(name = "mall_project_update_log", schema = "lahuobao")
@DynamicUpdate(true)
@DynamicInsert(true)
public class MallProjectUpdateLogEntity {
    private Integer id;

    private Integer logtype;

    private String updateuserid;

    private String cardno;

    private Date updatetime;

    private String logcontent;

    /*用户*/
    private TSBaseUser baseUser;

    @Column(name="CARDNO")
    public String getCardno() {
        return cardno;
    }

    public void setCardno(String cardno) {
        this.cardno = cardno;
    }


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name ="ID",nullable=false,precision=10,scale=0)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    @Column(name="LOGTYPE")
    public Integer getLogtype() {
        return logtype;
    }

    public void setLogtype(Integer logtype) {
        this.logtype = logtype;
    }
    @Column(name="UPDATEUSERID")
    public String getUpdateuserid() {
        return updateuserid;
    }

    public void setUpdateuserid(String updateuserid) {
        this.updateuserid = updateuserid == null ? null : updateuserid.trim();
    }
    @Column(name="UPDATETIME")
    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }
    @Column(name="LOGCONTENT")
    public String getLogcontent() {
        return logcontent;
    }

    public void setLogcontent(String logcontent) {
        this.logcontent = logcontent == null ? null : logcontent.trim();
    }

    @OneToOne
    @JoinColumn(name = "updateuserid", insertable = false, updatable = false)
    public TSBaseUser getBaseUser() {
        return baseUser;
    }

    public void setBaseUser(TSBaseUser baseUser) {
        this.baseUser = baseUser;
    }

}
